package com.tsingtree.sys.core.exception.enums;

import java.util.Map;
import java.util.TreeMap;

public enum NoticeTypeEnum {

	NOTICE(0, "运维通知"),
	JOB(1, "每日任务");

	private final int key;

	private final String desc;

	NoticeTypeEnum(int key) {
		this.key = key;
		this.desc = "";
	}

	NoticeTypeEnum(int key, String desc) {
		this.key = key;
		this.desc = desc;
	}

	public int getKey() {
		return this.key;
	}

	public String getDesc() {
		return this.desc;
	}

	public static Map<Integer, String> getAll() {
		Map<Integer, String> map = new TreeMap<>();
		for (NoticeTypeEnum loanInterestEnum : NoticeTypeEnum.values()) {
			map.put(loanInterestEnum.getKey(), loanInterestEnum.getDesc());
		}
		return map;
	}
}
